package wicketcool.converter;

import org.springframework.stereotype.Component;
import wicketcool.model.WCLModifier;

/**
 * User: rabbit
 * Date: Aug 3, 2009
 */
@Component
public class DefaultModifierConverter implements ModifierConverter {

    public int modifierToCUModifierInt(WCLModifier wclModifier) {

        if(wclModifier == WCLModifier.ABSTRACT) {
            return 1024;
        }

        return (int) Math.pow(2,wclModifier.ordinal());
    }
}
